#include <cstdio>

using namespace std; 

#define N 502

int a[N], b[N]; 
int r[N]; 

void add(void)
{
    int out; 

    for (int i=1; i<N; i++) {
        int t = r[i] + a[i] + b[i]; 
        r[i] = t % 10; 
        r[i+1] = t / 10; 
    }

    out = 0; 
    for (int i=N-1; i>=1; i--) {
        if (out || r[i]!=0 || i==1) {
            printf("%d", r[i]); 
            out = 1; 
        }
    }
    printf("\n"); 
}

void get_n(int *v)
{
	int p, i; 
	
	static char tmp[N]; 
	
    fgets(tmp, N, stdin); 
	for (p=0; p<N; p++) {
		if (tmp[p]=='\0' || tmp[p]=='\n' || tmp[p]=='\r') 
			break; 
	}
	p--; 
	i=1; 
	while (p>=0 && i<N-1) {
		v[i] = tmp[p] - '0'; 
		i++; 
		p--; 
	}
	v[i] = '\0'; 
}

int main()
{
	get_n(a); 
	get_n(b); 
    add();
    return 0; 
}

